Skip to content

Conversation

DimitrisMantas
Copy link
Contributor

Resolves #954

@DimitrisMantas
Copy link
Contributor Author

DimitrisMantas commented Nov 4, 2024

@qubvel @adamjstewart I kind of need this, and the community appears to do so as well. What is missing to make it land?

Copy link
Collaborator

@qubvel qubvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Overall looks good to me, just a nit comment

Comment on lines 53 to 58
def _merge_kwargs_no_dupls(a: dict[str, Any], b: dict[str, Any]) -> dict[str, Any]:
dupls = a.keys() & b.keys()
if dupls:
raise ValueError(f"'{dupls}' already specified internally")

return a | b
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's refactor it a bit:

  1. dupls -> duplicates
  2. "|" not sure which python version introduced it, maybe {**a, **b} would be more robust

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Looks like it was added in Python 3.9, so no need to change this: https://peps.python.org/pep-0584/

Copy link
Collaborator

@qubvel qubvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!

@qubvel qubvel merged commit cd5d3c2 into qubvel-org:main Nov 6, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow kwargs in TimmUniversalEncoder
3 participants